home *** CD-ROM | disk | FTP | other *** search
- #ifndef _LSTUDIO_
- #define _LSTUDIO_
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #include <terrain.h>
-
-
- #define OBJECT_NOT_FOUND -1
- #define ENTITY_LOADED 1
-
- typedef struct
- {
- PR_DWORD TileScale; /* X/Z axis (size of each square */
- PR_DWORD HeightScale; /* Y axis */
- PR_DWORD Radius; /* Number of tiles seen outward from the center */
- PR_DWORD Layers; /* Number of layers (1,2, or 3) */
- PR_DWORD FogEnabled; /* True if fogged */
- PR_UCHAR FogR, FogG, FogB; /* 3Dfx only */
- PR_DWORD FogColor; /* 3Dfx only (packed version) */
- PR_REAL FogNear, FogFar;
- PR_DWORD Mirror; /* True if reflections are on */
- } terrain_settings_struct;
- extern terrain_settings_struct Terrain_Settings;
-
- typedef struct {
- PR_MATRIX rot_mat;
- PR_POINT location;
- PR_POINT scale;
- PR_DWORD layer;
- PR_DWORD flags;
- PR_UCHAR name[13];
- PR_ENTITY *ent;
- PR_DWORD objnum;
- } EntityType;
- extern EntityType *EntityList;
-
- typedef struct
- {
- PR_UCHAR *name;
- PR_OBJECT *obj;
-
- PR_POINT lastscale;
- PR_MATRIX lastrot;
- PR_DWORD lastlayer;
- } ObjectType;
- extern ObjectType *ObjectList;
-
- typedef struct {
- PR_UCHAR r, g, b, a;
- PR_DWORD translucent;
- PR_DWORD keyed;
- } TileProperty;
- extern TileProperty TileProps[512];
-
-
- extern PR_TERRAIN * terrain;
- extern PR_DWORD tilemap[256*2];
- extern block tilesprites[1024];
- extern PR_DWORD TopEntity;
- extern PR_DWORD NumBaseTiles;
-
- extern PR_DWORD MaxObjects;
- extern PR_DWORD MaxEntities;
-
-
- void LS_AllocEntities (void);
- /* -----------------------------------------------------------------------
- Function: AllocEntities
- Purpose: Allocates room for a list of objects
- Parameters: maxobj - Number of objects to allocate space for
- Return: None
- ----------------------------------------------------------------------- */
-
-
- void LS_AllocObjects (void);
- /* -----------------------------------------------------------------------
- Function: LS_AllocObjects
- Purpose: Allocates room for a list of objects
- Parameters: maxobj - Number of objects to allocate space for
- Return: None
- ----------------------------------------------------------------------- */
-
- void LS_EntityCoordinateFix (PR_ENTITY *ent);
- /* -----------------------------------------------------------------------
- Function: LS_EntityCoordinateFix
- Purpose: Keeps the distance of from entity to the camera within half
- the map dimensions
- Parameters: ent - Pointer to the entity
- Return: None
- ----------------------------------------------------------------------- */
-
-
- PR_DWORD FindObject (char *filename);
- /* -----------------------------------------------------------------------
- Function: FindObject
- Purpose: Finds the object number given its filename
- Parameters: filename - Filename of the object
- Return: OBJECT_NOT_FOUND if the file is not in the ObjectList array
- or object number
- ----------------------------------------------------------------------- */
-
-
- PR_DWORD LS_LoadObject (char *filename);
- /* -----------------------------------------------------------------------
- Function: LoadObject
- Purpose: Loads the object and returns the object number
- Parameters: filename - Filename of the object
- Return: Index of the object
- ----------------------------------------------------------------------- */
-
-
- void LS_LoadTerrain (char *filename);
- /* -----------------------------------------------------------------------
- Function: LS_LoadTerrain
- Purpose: Loads a Landscape Studio level
- Parameters: filename - Name of the level file (.lsl)
- Return: None
- ----------------------------------------------------------------------- */
-
-
- void LS_RenderObjects (void);
- /* -----------------------------------------------------------------------
- Function: LS_RenderObjects
- Purpose: Displays the objects in the level
- Parameters: None
- Return: None
- ----------------------------------------------------------------------- */
-
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-
-